package com.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.mapper.OrdersSeizeMapper;
import com.fs.domain.OrdersSeize;
import com.fs.service.IOrdersSeizeService;

/**
 * 抢单池Service业务层处理
 * 
 * @author mumu
 * @date 2024-10-22
 */
@Service
public class OrdersSeizeServiceImpl implements IOrdersSeizeService 
{
    @Autowired
    private OrdersSeizeMapper ordersSeizeMapper;

    /**
     * 查询抢单池
     * 
     * @param id 抢单池主键
     * @return 抢单池
     */
    @Override
    public OrdersSeize selectOrdersSeizeById(Long id)
    {
        return ordersSeizeMapper.selectOrdersSeizeById(id);
    }

    /**
     * 查询抢单池列表
     * 
     * @param ordersSeize 抢单池
     * @return 抢单池
     */
    @Override
    public List<OrdersSeize> selectOrdersSeizeList(OrdersSeize ordersSeize)
    {
        return ordersSeizeMapper.selectOrdersSeizeList(ordersSeize);
    }

    /**
     * 新增抢单池
     * 
     * @param ordersSeize 抢单池
     * @return 结果
     */
    @Override
    public int insertOrdersSeize(OrdersSeize ordersSeize)
    {
        ordersSeize.setCreateTime(DateUtils.getNowDate());
        return ordersSeizeMapper.insertOrdersSeize(ordersSeize);
    }

    /**
     * 修改抢单池
     * 
     * @param ordersSeize 抢单池
     * @return 结果
     */
    @Override
    public int updateOrdersSeize(OrdersSeize ordersSeize)
    {
        ordersSeize.setUpdateTime(DateUtils.getNowDate());
        return ordersSeizeMapper.updateOrdersSeize(ordersSeize);
    }

    /**
     * 批量删除抢单池
     * 
     * @param ids 需要删除的抢单池主键
     * @return 结果
     */
    @Override
    public int deleteOrdersSeizeByIds(Long[] ids)
    {
        return ordersSeizeMapper.deleteOrdersSeizeByIds(ids);
    }

    /**
     * 删除抢单池信息
     * 
     * @param id 抢单池主键
     * @return 结果
     */
    @Override
    public int deleteOrdersSeizeById(Long id)
    {
        return ordersSeizeMapper.deleteOrdersSeizeById(id);
    }
}
